<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
    <style type="text/css">
        body, html{width: 100%;height: 200px;margin:0;font-family:"微软雅黑";}
        #allmap{height:500px;width:100%;}
        #r-result{width:100%; font-size:14px;}
    </style>
    <script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=NpFGuytCsV8IqklEkeqqyn0PYgY10mNu"></script>
    <title>城市名定位</title>
</head>
<body>
<div id="allmap"></div>

</body>
</html>
<script type="text/javascript">
    // 百度地图API功能
    var map = new BMap.Map("allmap");
    map.centerAndZoom(new BMap.Point(104.067094,30.67977
    ),14);
    map.enableScrollWheelZoom(true);
    var marker = new BMap.Marker(new BMap.Point(104.067094, 30.67977)); // 创建点
    function add_overlay(){
        map.addOverlay(marker);            //增加点
    }
    add_overlay()
</script>
